using Lzfy_His_Service.Models;

namespace Lzfy_His_Service.Repositories
{
    public interface IPermissionRepository
    {
        Task<List<MenuDto>> GetMenuTreeAsync(MenuTreeRequest request);
        Task<List<MenuDto>> GetAllMenusAsync();
        Task<Menu?> GetMenuByIdAsync(int id);
        Task<int> AddMenuAsync(Menu menu);
        Task<bool> UpdateMenuAsync(Menu menu);
        Task<bool> DeleteMenuAsync(int id);
        Task<bool> ToggleMenuStatusAsync(int id, bool isActive);
        Task<List<MenuDto>> GetRoleMenusAsync(int roleId);
        Task<bool> AssignRolePermissionsAsync(int roleId, List<int> menuIds);
        Task<bool> RemoveRolePermissionsAsync(int roleId);
        Task<List<MenuDto>> GetUserMenusAsync(int userId);
        Task<bool> MenuCodeExistsAsync(string menuCode, int? excludeId = null);
    }
}